﻿/*
 * Jonathan.Tests
 * Created by: Jonathan Montiverdi
 * Date: 6/13/2012
 * License: http://jonathan.codeplex.com/license
 */
using Jonathan.Data;
using NUnit.Framework;

namespace Jonathan.Tests.Data
{
   /// <summary>
   /// Tests the extension methods in Jonathan.
   /// </summary>
   [TestFixture]
   public class TestExtensions
   {
      /// <summary>
      /// Tests the string to bool method.
      /// </summary>
      [Test]
      public void TestStringToBool ()
      {
         string test = null;
         Assert.IsFalse (test.ToBool (), "null string in ToBool extension failed.");
         Assert.IsFalse (string.Empty.ToBool (), "Empty string in ToBool extension failed.");
         Assert.IsFalse ("FakeString".ToBool (), "Fake string in ToBool extension failed.");
         Assert.IsFalse ("false".ToBool (), "False string in ToBool extension failed.");
         Assert.IsTrue ("true".ToBool (), "True string in ToBool extension failed.");
      }
   }
}
